package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 退住记录实体类
 * 
 * @author mark
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_check_out")
@Schema(name = "ElderCheckOut", description = "退住记录表")
public class ElderCheckOut {

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "合同ID")
    @TableField("contact_id")
    private Long contactId;

    @Schema(description = "长者ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "床位号")
    @TableField("room_number")
    private String roomNumber;

    @Schema(description = "退住日期")
    @TableField("check_out_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime checkOutDate;

    @Schema(description = "退住原因类型：1-正常退住，2-转院，3-死亡，4-其他")
    @TableField("check_out_reason")
    private Integer checkOutReason;

    @Schema(description = "审批状态：0-待审批，1-已批准，已退房2-已拒绝")
    @TableField("approval_status")
    private Integer approvalStatus;

    @Schema(description = "退费金额")
    @TableField("refund_amount")
    private BigDecimal refundAmount;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "入住金额")
    @TableField("check_in_amount")
    private BigDecimal checkInAmount;


}
